import Vue from 'vue'
import Vuex from 'vuex'
import axios from "axios"

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    islogin:sessionStorage.getItem("islogin") ? 1 : 0,
    user : sessionStorage.getItem("user")?JSON.parse(sessionStorage.getItem("user")) :""
  },
  mutations: {
    setuser(state,user){
      state.user = user
    },
    setislogin(state,islogin){
      state.islogin = islogin;
    },
    adduser(state,user){
      state.user.push(user)
    }
  },
  actions: {
    
  },
  modules: {
  }
})
